package ysq.xyg.web.service;


import ysq.xyg.base.model.dto.ReturnEntity;
import ysq.xyg.base.service.BaseService;
import ysq.xyg.sys.model.po.SysUser;
import ysq.xyg.web.model.po.WebMember;
import ysq.xyg.web.model.po.WebWithdraw;
import ysq.xyg.web.model.vo.WebWithdrawVo;

import java.util.List;

/**
 * 商城模块-提现表service接口
 *
 * @author congcong tao
 * @date 2019-4-28 11:19:58
 */
public interface WebWithdrawService extends BaseService<WebWithdraw> {
    /**
     * 分页查询
     *
     * @param WebWithdrawVo 对象
     * @param pageSize 当前页面
     * @param pageNum 页面数量
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-4-28 11:19:58
     */
    ReturnEntity page(WebWithdrawVo WebWithdrawVo, int pageSize, int pageNum);

    ReturnEntity pageLeft(WebWithdrawVo WebWithdrawVo, int pageSize, int pageNum);
    
    /**
     * 修改
     *
     * @param WebWithdrawVo 对象
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-4-28 11:19:58
     */
    ReturnEntity addOrUpdate(WebWithdrawVo WebWithdrawVo, SysUser currentUser);
    /**
     * 删除
     *
     * @param id 主键id删除
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-4-28 11:19:58
     */
    ReturnEntity delete(String id, SysUser currentUser);
    /**
     * 获取集合
     *
     * @param WebWithdrawVo 对象
     * @return List<WebWithdraw> WebWithdraw集合
     * @author congcong tao
     * @date 2019-4-28 11:19:58
     */
    List<WebWithdraw> acceptList(WebWithdrawVo WebWithdrawVo);

    List<WebWithdraw> selectEntityList(WebWithdrawVo WebWithdrawVo);

    /**
     * 提现
     * @param webMember 用户信息
     * @param money 金额
     * @author congcong tao
     * @date 2019/7/6 11:00
     */
    ReturnEntity withdrawEdit(WebMember webMember, String money);

    /**
     * 提现状态，如果否的话需要将该金额还给用户
     * @param id
     * @param status
     * @author congcong tao
     * @date 2019/8/6 17:22
     */
    ReturnEntity updateStatus(String id, String type, String status, String description);

    Double selectCountMoney(String memberId, String status);
}
